package com.ruoyi.system.statis.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.statis.mapper.ServiceStatisCourseMapper;
import com.ruoyi.system.statis.domain.ServiceStatisCourse;
import com.ruoyi.system.statis.service.IServiceStatisCourseService;
import com.ruoyi.common.core.text.Convert;

/**
 * 课程统计Service业务层处理
 *
 * @author Administrator
 * @date 2021-03-06
 */
@Service
public class ServiceStatisCourseServiceImpl implements IServiceStatisCourseService {
    @Autowired
    private ServiceStatisCourseMapper serviceStatisCourseMapper;

    /**
     * 查询课程统计
     *
     * @param id 课程统计ID
     * @return 课程统计
     */
    @Override
    public ServiceStatisCourse selectServiceStatisCourseById(Long id) {
        return serviceStatisCourseMapper.selectServiceStatisCourseById(id);
    }

    /**
     * 查询课程统计列表
     *
     * @param serviceStatisCourse 课程统计
     * @return 课程统计
     */
    @Override
    public List<ServiceStatisCourse> selectServiceStatisCourseList(ServiceStatisCourse serviceStatisCourse) {
        return serviceStatisCourseMapper.selectServiceStatisCourseList(serviceStatisCourse);
    }

    /**
     * 新增课程统计
     *
     * @param serviceStatisCourse 课程统计
     * @return 结果
     */
    @Override
    public int insertServiceStatisCourse(ServiceStatisCourse serviceStatisCourse) {
        return serviceStatisCourseMapper.insertServiceStatisCourse(serviceStatisCourse);
    }

    /**
     * 修改课程统计
     *
     * @param serviceStatisCourse 课程统计
     * @return 结果
     */
    @Override
    public int updateServiceStatisCourse(ServiceStatisCourse serviceStatisCourse) {
        return serviceStatisCourseMapper.updateServiceStatisCourse(serviceStatisCourse);
    }

    /**
     * 删除课程统计对象
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteServiceStatisCourseByIds(String ids) {
        return serviceStatisCourseMapper.deleteServiceStatisCourseByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除课程统计信息
     *
     * @param id 课程统计ID
     * @return 结果
     */
    @Override
    public int deleteServiceStatisCourseById(Long id) {
        return serviceStatisCourseMapper.deleteServiceStatisCourseById(id);
    }
}
